<include file="Common:header" />
<TYimport plugin='datepicker' />
<div class="table_content" >
    <form action="{:U(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME)}" method="post"  class="ajax_form">
        <table class="edit_table">
            <input name="id" type="hidden" value="{$info.order_id}">
            <tr>
                <td class="tablehead">訂單號</td>
                <td>
                    {$info.ordersn}<label class="tips"></label>
                </td>
            </tr>
            <tr>
                <td class="tablehead">洗車類型</td>
                <td>
                    <p>
                		<if condition="$info.card_type eq 1">
                		次卡
                		<elseif condition="$info.card_type eq 2"/>
                		周卡
                		<elseif condition="$info.card_type eq 3"/>
                		月卡
                		<elseif condition="$info.card_type eq 4"/>
                		年卡
                		</if>
                		</p>
                		<label class="tips"></label>
                </td>
            </tr>

            <tr>
                <td class="tablehead">洗車費</td>
                <td>
                    	￥{$info.price}<label class="tips"></label>
                </td>
            </tr>

            <tr>
                <td class="tablehead">實付金額</td>
                <td>
                	<if condition="$info.coupon_id neq null">
                    	￥{$info.real_price}
                    <else/>
                    	￥{$info.price}
                    </if>
                    <label class="tips"></label>
                </td>
            </tr>
            <tr>
                <td class="tablehead">是否使用了優惠券</td>
                <td>
                	<if condition="$info.coupon_id gt 0">
                    	是
                    <else/>
                    	否
                    </if>
                    <label class="tips"></label>
                </td>
            </tr>
            <if condition="$info.coupon_id gt 0">
             <tr>
                <td class="tablehead">優惠券名</td>
                <td>
                	{$info.coupon_name}
                    <label class="tips"></label>
                </td>
            </tr>
             <tr>
                <td class="tablehead">優惠金額</td>
                <td>
                	￥{$info.coupon_price}
                    <label class="tips"></label>
                </td>
            </tr>
            </if>
            <tr>
                <td class="tablehead">訂單狀態</td>
                <td>
                	<switch name="info['status']">
	                		<case value="1">已付款</case>
                            <case value="0">未付款</case>
                            <case value="-1">退款審核中</case>
                            <case value="-2">退款審核成功</case>
                            <case value="-3">退款中</case>
                            <case value="-4">退款成功</case>
                            <default>非法订单
					</switch>
                </td>
            </tr>
            <tr>
                <td class="tablehead">下單時間</td>
                <td>
                	{$info.o_create_time|date="Y-m-d H:i:s",###}
                </td>
            </tr>

            <tr>
                <td class="tablehead">下單車品牌</td>
                <td>
                	{$info.brand}
                </td>
            </tr>

             <tr>
                <td class="tablehead">車牌號</td>
                <td>
                    {$info.license_plate}<label class="tips"></label>
                </td>
            </tr>

             <tr>
                <td class="tablehead">車牌顏色</td>
                <td>
                    {$info.color}<label class="tips"></label>
                </td>
            </tr>

             <tr>
                <td class="tablehead">車牌類型</td>
                <td>
                    <if condition="$info.type eq 1">
                    	五座車
                    <elseif condition="$info.type eq 2"/>
                    	七座車
                    <else/>
                    	七座以上
                    </if>
                    <label class="tips"></label>
                </td>
            </tr>

             <tr>
                <td class="tablehead">下單用戶</td>
                <td>
                    {$info.user_name}<label class="tips"></label>
                </td>
            </tr>

            <tr>
                <td class="tablehead">下單用戶電話</td>
                <td>
                    {$info.order_phone}<label class="tips"></label>
                </td>
            </tr>

            <tr>
                <td class="tablehead">洗車拍照</td>
                <td>
                    <img src="/upload/car_img/{$wlinfo.carhead_img}"/>
                    <img src="/upload/car_img/{$wlinfo.carleft_img}"/>
                    <img src="/upload/car_img/{$wlinfo.carright_img}"/>
                    <img src="/upload/car_img/{$wlinfo.carback_img}"/>

                    <label class="tips"></label>
                </td>
            </tr>
        </table>

        <div class="tab_box_btn">
            <input type="button" class="back_btn" value="返回"/>
            <!-- 申请退款中才会出现 退款审核 -->
            <if condition="$info['status'] eq -1 ">
                <input type="button" class="save_btn" value="退款審核"/>
            </if>
        </div>
    </form>
</div>
<script type="text/javascript">

//退款审核
$(".save_btn").click(function(){
    var formId = $('input[name=id]').val();
    window.location.href = "/Orders/refund_audit_view/id/"+formId;
});

</script>
<include file="Common:footer" />
